<?php
class EMSInit extends CComponent 
{
	public function init()
	{
		$settings = Settings::model()->findAll('activated = 1');
		if(!empty($settings)){
			foreach ($settings as $k){
				if(!defined($k->name)){
					define($k->name, $k->value);
				}
			}
		}
		Yii::app()->theme 		= APP_THEME;
		Yii::app()->language 	= APP_LANG;
	}
}
?>
